package com.yugao.fintech.antelope.infra.job.task;

import com.yugao.fintech.antelope.infra.job.service.IJobLogService;
import com.yugao.fintech.antelope.base.model.module.tenant.TenantContextHolder;
import com.yugao.fintech.antelope.statistic.api.StatisticApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;


@Slf4j
@Component(value = "statAccessTask")
public class StatAccessTask implements ITask {
    @Autowired
    private IJobLogService jobLogService;
    @Autowired
    private StatisticApi statisticApi;

    /**
     * 执行统计访问数据任务
     */
    public void exec() {
        log.info("exec stat access task, tenantId: {}", TenantContextHolder.get().getTenantId());
        statisticApi.statAccessTask();
    }
}
